//
//  CHDBaseUINavigationVC.m
//  IOSWeiiPhoneNews
//
//  Created by ibokan on 14-4-23.
//  Copyright (c) 2014年 chen. All rights reserved.
//

#import "CHDBaseUINavigationVC.h"

#define UIColorFromRGB(r,g,b) [UIColor colorWithRed:r/255.0 green:g/255.0 blue:b/255.0 alpha:1.0]
@interface CHDBaseUINavigationVC ()

@end

@implementation CHDBaseUINavigationVC

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        // Custom initialization
    }
    return self;
}

- (void)viewDidLoad
{
    [super viewDidLoad];
    //设置导航栏的背景颜色
    [[UINavigationBar appearance] setBarTintColor:UIColorFromRGB(140,140,140)];
    
    //定制返回按钮的颜
    [[UINavigationBar appearance] setTintColor:[UIColor whiteColor]];
    
    //修改导航栏标题的字体
    NSShadow *shadow = [[NSShadow alloc] init];
    //设置阴影颜色
    shadow.shadowColor = [UIColor colorWithRed:0.1 green:0.1 blue:0.1 alpha:1];
    //设置阴影偏移位置
    shadow.shadowOffset = CGSizeMake(0, 0.2);
    [[UINavigationBar appearance] setTitleTextAttributes: [NSDictionary dictionaryWithObjectsAndKeys:
                                                           [UIColor colorWithRed:1.0 green:1.0 blue:1.0 alpha:1.0], NSForegroundColorAttributeName,
                                                           shadow, NSShadowAttributeName,
                                                           [UIFont boldSystemFontOfSize:28.0], NSFontAttributeName, nil]];
    
}

- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
